{% extends 'dashboard/base.html' %}
{% load i18n %}
{% load materializecss %}
{% load staticfiles %}

{% block title %}
  {% trans "Stock locations" context "Dashboard stock location" %} - {{ block.super }}
{% endblock %}

{% block body_class %}body-locations{% endblock %}

{% block header_extra %}
  <div class="fixed-action-btn">
    <a class="btn-fab btn-floating btn-large waves-effect waves-light teal" href="{% url 'dashboard:product-stock-location-add' %}" title="{% trans "Add stock location" context "Stock location list add button text" %}">
      <svg data-src="{% static "dashboard/images/add.svg" %}" />
    </a>
  </div>
{% endblock %}

{% block breadcrumbs %}
  <ul class="breadcrumbs">
    <li class="visible-s">
      {% trans "Stock locations" context "Dashboard stock location" %}
    </li>
  </ul>
{% endblock %}

{% block menu_location_class %} active{% endblock %}

{% block content %}
  <div class="row">
    <div class="col s12">
      {% if locations %}
        <ul class="collection list">
          {% for location in locations %}
            <li class="collection-item list-item">
                <a href="{% url 'dashboard:product-stock-location-edit' location.pk %}">
                  <p class="list-item-name--single">
                    {{ location }}
                  </p>
                </a>
            </li>
          {% endfor %}
        </ul>
      {% else %}
        <div class="not-found">
          <p class="grey-text">
            {% trans "No locations found." context "Empty stock location list message" %}
          </p>
        </div>
      {% endif %}
    </div>
  </div>
{% endblock %}
